//
//  PersonalDataViewController.m
//  massage
//
//  Created by 李志权 on 2017/1/4.
//  Copyright © 2017年 李志权. All rights reserved.
//

#import "PersonalDataViewController.h"

@interface PersonalDataViewController ()
@property (weak, nonatomic) IBOutlet UIView *aView;

@end

@implementation PersonalDataViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.hidesBottomBarWhenPushed = YES;
    self.navigationItem.title = @"个人资料";
    
    
    UIColor *colorOne = [UIColor colorWithRed:(49/255.0)  green:(255/255.0)  blue:(132/255.0)  alpha:1];
    UIColor *colorTwo = [UIColor colorWithRed:(2/255.0)  green:(200/255.0)  blue:(250/255.0)  alpha:1];
    
    CAGradientLayer *gradientLayer =  [CAGradientLayer layer];
    gradientLayer.frame = CGRectMake(0, 0, Width, 175);
    //设置颜色
    [gradientLayer setColors:[NSArray arrayWithObjects:(id)[colorOne CGColor],(id)[colorTwo CGColor], nil]];
    //每种颜色最亮的位置
    //    [gradientLayer setLocations:@[@.5,@.5]];
    //渐变的方向StartPoint－>EndPoint
    [gradientLayer setStartPoint:CGPointMake(0, 0)];
    [gradientLayer setEndPoint:CGPointMake(1, 1)];
    [self.aView.layer addSublayer:gradientLayer];
    
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
